#ifndef __SCENE_H__
#define __SCENE_H__

#include <cocos2d.h>
#include "gofgame/common/cxx_0x.h"
#include "gofgame/common/Ref.h"
#include "gofgame/jumpdown/layer/UILayer.h"
#include "gofgame/jumpdown/layer/SpriteLayer.h"
#include "gofgame/jumpdown/layer/BackgroundLayer.h"
#include "SimpleAudioEngine.h"
using namespace cocos2d;
using namespace gofgame::common;
using namespace gofgame::jumpdown::layer;

namespace gofgame {
	namespace jumpdown {
		class Scene : public CCScene {
		public:
			bool init();
			virtual ~Scene();
			
			void gameOver();

			UILayer *getUILayer() const;
			SpriteLayer *getSpriteLayer() const;
			BackgroundLayer *getBackgroundLayer() const;
			void showMenuLayer();

		private:
			Ref<UILayer> uiLayer;
			Ref<SpriteLayer> spriteLayer;
			Ref<BackgroundLayer> backgroundLayer;
			
		private:
			void onHttpRequestCompleted(cocos2d::CCNode *sender, void *data);
			void preLoadAudio();
		};
	}
}

#endif //__SCENE_H__
